home *** CD-ROM | disk | FTP | other *** search
/ PC & Mediji 1998 February / PCM_9802.iso / programi / director / data.z / Behavior Library.cst / 00027_Script_Net Show Proxy < prev    next >
Text File  |  1997-05-09  |  2KB  |  52 lines

  1. -- Net Show Proxy 
  2.  
  3.  
  4. -- polls the member to see if it's loaded and switches the proxy out when loaded.  Requires 
  5. -- PrepareFrame event so this won't work in a tempo channel wait.  Keep the play head moving
  6. -- or use a go the frame loop. 
  7.  
  8.  
  9. property proxy, heromember
  10.  
  11.  
  12. on beginsprite me
  13.   set the heromember of me = the member of sprite the spritenum of me
  14.   set the member of sprite the spritenum of me = member proxy
  15.   set the forecolor of sprite the spritenum of me = the forecolor of member proxy
  16.   set the backcolor of sprite the spritenum of me = the backcolor of member proxy
  17. end
  18.  
  19.  
  20. on prepareframe me
  21.   if the mediaReady of member the heromember of me then
  22.     set the member of sprite the spritenum of me = member the heromember of me
  23.   end if
  24. end
  25.  
  26.  
  27. on getPropertyDescriptionList
  28.   if the currentspritenum = 0 then 
  29.     set memdefault = 0 
  30.   else
  31.     set memref = the member of sprite the currentspritenum
  32.     set castlibnum = the castlibnum of memref
  33.     set memdefault = member (the membernum of member memref + 1) of castlib castlibnum
  34.   end if
  35.   
  36.   set p_list = [ ¼
  37.          #proxy: [ #comment:   "Proxy Castmember:", ¼
  38.                     #format:   #shape, ¼
  39.                    #default:    memdefault ] ¼
  40.                  ]
  41.   return p_list
  42. end
  43.  
  44. on getBehaviorDescription 
  45.   return ¼
  46. "Displays a designated placeholder image while media is being retrieved from the network.  Allows  a simple graphic (usually a shape) to be displayed while larger cast members load.  Automatically replaces the proxy with actual media when the media finishes downloading. Drag this behavior to a sprite that displays a large cast member that may download slowly." & RETURN & ¼
  47. "PARAMETERS:" & RETURN & ¼
  48. "ò Proxy Castmember - Enter the name of the internal cast member that should serve as a placeholder."
  49.   
  50.   
  51. end
  52.